-
Notifications
You must be signed in to change notification settings - Fork 100
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Jakarta Mail erroneously assumes that classes can be loaded from Thread#getContextClassLoader #701
Conversation
…ad#getContextClassLoader Signed-off-by: jmehrens <[email protected]>
@lukasj @jbescos Here is my attempt at fixing this error. Basically this change probes various classloaders in order of preference to find the provider that is usable in the caller classloader. Let me know what you think. For sure it seems suspect to me that I'm not using a PrivilegedAction to fetch the classloader. Thoughts? Testing this change is not going to be easy. |
…ad#getContextClassLoader Signed-off-by: jmehrens <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Probe for HK2 targets in different loaders. Signed-off-by: jmehrens <[email protected]>
Signed-off-by: jmehrens <[email protected]>
Signed-off-by: jmehrens <[email protected]>
Signed-off-by: jmehrens <[email protected]>
Signed-off-by: jmehrens <[email protected]>
Signed-off-by: jmehrens <[email protected]>
Signed-off-by: jmehrens <[email protected]>
Signed-off-by: jmehrens <[email protected]>
Signed-off-by: jmehrens <[email protected]>
@jbescos Fixed issues with:
|
Signed-off-by: jmehrens <[email protected]>
Signed-off-by: jmehrens <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have reproduced the issue interactively in Jenkins with the Gmail SMTP server at HEAD with commit 6c9ac50 and verified that the issue is resolved with this PR.
A merge and release of this PR would unblock our upgrade to recent versions of Mail API and allow us to resolve issues like JENKINS-70627. |
Thanks @basil for testing. I'm surprised this worked as is with out a similar fix to JAF. Either way I'll try to get this merged. |
I have been working around the problem in Jakarta Activation with https://github.com/jenkinsci/jakarta-mail-api-plugin/tree/5a95bb71b308c7ba2dab277deffb36dfe1e03c8c/src/main/java/io/jenkins/plugins/jakarta/activation for years now. But I have no workaround for this issue in Jakarta Mail. |
#665